package com.itqf.config;

import com.itqf.factorybean.UserFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * projectName: springframeworkgp8
 *
 * @author: 赵伟风
 * time: 2021/8/3 10:00
 * description:
 */
@Configuration
@ComponentScan(basePackages = "com.itqf.pojo")
//引入配置文件
@PropertySource("info.properties")
public class AnnotationConfig {

//    @Bean
//    public User createUser(){
//        User user = new User();
//        user.setName("呵呵呵");
//        user.setAge(88);
//        return user;
//    }


    @Bean
    public UserFactoryBean createUserFactoryBean(){

        return new UserFactoryBean();
    }
}
